<template>
    <u-popup :show="show" mode="center" @close="closeClick" bgColor="transparent">
        <view class="customer">
            <view class="title">取票码</view>
            <view class="txt">{{ qrcode }}</view>
            <view>
                <x-qrcode :text="qrcode" :isInit="false" :size="sizeWidth"></x-qrcode>
            </view>
        </view>
    </u-popup>
</template>

<script>
import xQrcode from '@/sub_pages/movie/components/x-qrcode/x-qrcode.vue';
export default {
    components: {
        xQrcode,
    },
    data() {
        return {
            show: false,
            qrcode: '',
            sizeWidth: uni.upx2px(420),
        };
    },
    methods: {
        closeClick() {
            this.show = false;
        },
        open(e) {
            this.qrcode = e;
            this.show = true;
        },
    },
};
</script>

<style lang="scss" scoped>
.customer {
    width: 500rpx;
    border-radius: 15rpx;
    padding: 30rpx 40rpx;
    padding-bottom: 50rpx;
    background-color: #fff;
    .title {
        font-size: 32rpx;
        font-weight: bold;
        text-align: center;
    }
    .txt {
        margin-top: 20rpx;
        margin-bottom: 20rpx;
        font-size: 28rpx;
        text-align: center;
    }
}
</style>
